﻿@model Sykj.Entity.ThumbnailSize
@{
    ViewData["Title"] = "缩略图管理";
    Layout = "~/Areas/Manager/Views/Shared/_Layout.cshtml";
}
<div class="layui-bg">
    <div class="layui-card-body">
        <form class="layui-form">
            <input type="hidden" name="ThumId" asp-for="ThumId" />
            <div class="layui-form-item">
                <div class="layui-col-xs3">
                    <label class="layui-form-label" style="width:100%">系统模块</label>
                </div>
                <div class="layui-col-xs6">
                    <select id="Type" name="Type" lay-verify="required" asp-for="Type">
                        <option value="">请选择模块</option>
                        <option value="0">Shop</option>
                        <option value="1">CMS</option>
                        <option value="2">SNS</option>
                        <option value="3">Property</option>
                        <option value="4">House</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-col-xs3">
                    <label class="layui-form-label" style="width:100%">缩略图标识符</label>
                </div>
                <div class="layui-col-xs6" style="position: relative;">
                    <input type="text" class="layui-input" readonly asp-for="ThumName">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-col-xs3">
                    <label class="layui-form-label" style="width:100%">宽度</label>
                </div>
                <div class="layui-col-xs2">
                    <input type="text" name="ThumWidth" class="layui-input" lay-verify="required" asp-for="ThumWidth">
                </div>
                <div class="layui-col-xs2">
                    <label class="layui-form-label" style="width:100%">高度</label>
                </div>
                <div class="layui-col-xs2">
                    <input type="text" name="ThumHeight" class="layui-input" lay-verify="required" asp-for="ThumHeight">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-col-xs3">
                    <label class="layui-form-label" style="width:100%">剪切模式</label>
                </div>
                <div class="layui-col-xs6">
                    <select id="ThumMode" name="ThumMode" lay-verify="required" asp-for="ThumMode">
                        <option value="">请选择剪切模式</option>
                        <option value="HW">指定高宽缩放（补白）</option>
                        <option value="W">指定宽，高按比例</option>
                        <option value="H">指定高，宽按比例</option>
                        <option value="Cut">指定高宽裁减（不变形）</option>
                        <option value="Csize">调整图片大小</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-col-xs3">
                    <label class="layui-form-label" style="width:100%">描述</label>
                </div>
                <div class="layui-col-xs6">
                    <input type="text" name="Remark" class="layui-input" lay-verify="required" asp-for="Remark">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-col-xs3">
                </div>
                <div class="layui-col-xs6">
                    <button class="layui-btn" lay-submit lay-filter="edit" id="submit" type="button">提交</button>
                    <button id="close" type="button" class="layui-btn layui-btn-primary">关闭</button>
                </div>
            </div>
        </form>
    </div>
</div>

@section scriptsfeet
    {
    <script type="text/javascript">

        layui.config({
            base: '/layuiadmin/' //自定义模块路径
        }).use(['form', 'layer', 'sykjwh','table'], function () {
            var $ = layui.$, form = layui.form, sykjwh = layui.sykjwh;

            $("#close").click(function () {
                sykjwh.close();
            });

           form.on('submit(edit)', function (obj) {
                //保存
                sykjwh.save('@Url.Action("ThumbnailSizeEdit", "Ms", new { area = Constant.AREAMANAGER })', obj.field);
            });

        });
    </script>
}
